Helpers.js ➔ t   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
c 1
b 0
f 0
nc 3
nop 2
dl 0
loc 8
rs 10
1
export function t(text, arr) {
2
    for (let k in arr) {
3
        if (arr.hasOwnProperty(k)) {
4
            text = text.split('{{' + k + '}}').join(arr[k]);
5
        }
6
    }
7
    return text;
8
}